﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace Best.SmartCms.API.Migrations
{
    public partial class upalodfile : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "FileName",
                table: "Attachment",
                newName: "Type");

            migrationBuilder.RenameColumn(
                name: "FileLenth",
                table: "Attachment",
                newName: "Size");

            migrationBuilder.RenameColumn(
                name: "FileExt",
                table: "Attachment",
                newName: "Name");

            migrationBuilder.AddColumn<string>(
                name: "ThumbUrl",
                table: "Attachment",
                maxLength: 250,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Url",
                table: "Attachment",
                maxLength: 250,
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ThumbUrl",
                table: "Attachment");

            migrationBuilder.DropColumn(
                name: "Url",
                table: "Attachment");

            migrationBuilder.RenameColumn(
                name: "Type",
                table: "Attachment",
                newName: "FileName");

            migrationBuilder.RenameColumn(
                name: "Size",
                table: "Attachment",
                newName: "FileLenth");

            migrationBuilder.RenameColumn(
                name: "Name",
                table: "Attachment",
                newName: "FileExt");
        }
    }
}
